package com.fowo.api.sys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fowo.api.sys.entity.SysUserRole;
import com.fowo.api.sys.model.UserRoleNameItem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
    List<Long> selectIdsByUserId(@Param("userId") Long userId);

    List<Long> selectRoleIdsByUserId(@Param("userId") Long userId);

    int deleteByUserId(@Param("userId") Long userId);

    List<UserRoleNameItem> selectUserRoleNameByUsers(@Param("userIds") List<Long> userIds);
}
